package com.fenghongzhang.day004_rxjava_rxretrofit;


import io.reactivex.Observable;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface Api {

    @GET("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Call<Food> getFood();

    @GET("/ios/cf/dish_list.php?stage_id=1&limit=20")
    Call<Food> getFood1(@Query("page") String page);

    @GET("/{ios}/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Call<Food> getFood2(@Path("ios") String ios);

    @POST("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Call<Food> getFood3();

    @POST("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    @FormUrlEncoded
    Call<Food> getFood4(@Field("userName") String name);

    @POST("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    @Multipart
    Call<Food> getFood5(@Part("userName") String name);


    @POST("/login")
    @FormUrlEncoded
    Call<User> login(@Field("name") String name, @Field("password") String password);


    @GET("/ios/cf/dish_list.php?stage_id=1&limit=20&page=1")
    Observable<Food> getFood6();



}
